<!DOCTYPE html>
<html lang="en">
<script src="js/jquery-1.12.4.js"></script>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        ul li{
            list-style: none;
            float: left;
        }
        #box{
            border: 1px solid crimson;
            height: auto;
            width: 400px;
        }
        #left{
            list-style: none;
        }
        #left li{
            margin: 2px 5px;
            padding: 2px 5px;
            float: left;
            border-radius: 5px;
            border: 1px solid crimson;
        }
        .count{
            background-color: coral;
        }
        #right{
            clear: both;
            height:auto;

            padding-top:5px;
        }
        #right .item{
            width: 400px;
            height: 300px;
            display: none;
            box-sizing: border-box;
        }
        #right .item vouse{
            display: block;
        }
        #right .item:nth-child(1){
            display: block;
        }
        #right .item img{
            width: 100%;
            height: 100%;
            background-size: cover;
        }

    </style>
</head>
<body>
<div id="box">
    <div>
        <ul id="left">
            <li>标题1</li>
            <li>标题2</li>
            <li>标题3</li>
            <li>标题4</li>
            <li>标题5</li>
        </ul>
    </div>
    <div id="right">
        <div class="item vouse"><img src="img/06.jpg"></div>
        <div class="item"><img src="img/05.jpg"></div>
        <div class="item"><img src="img/07.png"></div>
        <div class="item"><img src="img/03.jpeg"></div>
        <div class="item"><img src="img/04.jpg"></div>
    </div>
</div>
<script>
$(function () {
    $("#left li").click(function () {
        $(this).addClass("count").siblings().removeClass("count");
        var index =$(this).index();
        console.log(index);
       $("#right .item").eq(index).show().siblings().hide();

    })

})
</script>
</body>
</html>